package com.czc.cca.ddl;

import org.zoomdev.zoom.dao.ddl.*;
import org.zoomdev.zoom.dao.driver.mysql.MysqlDriver;

@_DDL_CompoundUniqueGroup({
        @_DDL_CompoundUnique(name = "UNI_dev_id_dev_seq", columns = {"dev_id", "dev_seq"})
})
@_DDL_Table(name = "t_pay", simpleName = "", engine = MysqlDriver.InnoDB, comment = "支付流水表")
public class _DDL_Pay {

    @_DDL_Primary()
    @_DDL_Column(name = "id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "与时间有段的id")
    private java.math.BigInteger id;

    @_DDL_Column(name = "amt", type = SqlType.DECIMAL, size = 8, scale = 2, nullable = false, comment = "交易金额(元）")
    private java.math.BigDecimal amt;

    @_DDL_Index(name = "IDX_t_pay_dev_id")
    @_DDL_Column(name = "dev_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "设备id")
    private Long devId;

    @_DDL_Column(name = "dev_seq", type = SqlType.VARCHAR, size = 32, comment = "")
    private String devSeq;

    @_DDL_Column(name = "dev_time", type = SqlType.TIMESTAMP, comment = "前端交易时间")
    private java.sql.Timestamp devTime;

    @_DDL_Index(name = "IDX_t_pay_usr_id")
    @_DDL_Column(name = "usr_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "用户id")
    private Long usrId;

    @_DDL_Column(name = "ag_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "渠道商id")
    private Long agId;

    @_DDL_Index(name = "IDX_t_pay_mer_id")
    @_DDL_Column(name = "mer_id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "商户id")
    private java.math.BigInteger merId;

    @_DDL_Column(name = "type", type = SqlType.TINYINT_UNSIGNED, nullable = false, comment = "支付方式")
    private Integer type;

    @_DDL_Column(name = "tag", type = SqlType.SMALLINT_UNSIGNED, nullable = false, comment = "标签id")
    private Integer tag;

    @_DDL_Column(name = "qb_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "钱包id")
    private Long qbId;

    @_DDL_Column(name = "state", type = SqlType.TINYINT_UNSIGNED, nullable = false, comment = "交易状态")
    private Integer state;

    @_DDL_Index(name = "IDX_t_pay_date")
    @_DDL_Column(name = "date", type = SqlType.INT_UNSIGNED, nullable = false, comment = "交易日期")
    private Long date;

    @_DDL_Column(name = "med_id", type = SqlType.VARCHAR, size = 32, comment = "")
    private String medId;

    @_DDL_Column(name = "pro_id", type = SqlType.INT_UNSIGNED, comment = "当期签约")
    private Long proId;

    @_DDL_Column(name = "ag_amt", type = SqlType.DECIMAL, size = 8, scale = 2, comment = "机构金额")
    private java.math.BigDecimal agAmt;

    @_DDL_Column(name = "plat_amt", type = SqlType.DECIMAL, size = 8, scale = 2, comment = "平台金额")
    private java.math.BigDecimal platAmt;

    @_DDL_Column(name = "mer_amt", type = SqlType.DECIMAL, size = 8, scale = 2, comment = "商户金额")
    private java.math.BigDecimal merAmt;

    @_DDL_Column(name = "err_msg", type = SqlType.VARCHAR, size = 300, comment = "失败原因")
    private String errMsg;

    @_DDL_Column(name = "err_code", type = SqlType.VARCHAR, size = 20, comment = "失败代码")
    private String errCode;

    @_DDL_Column(name = "ch_id", type = SqlType.VARCHAR, size = 30, comment = "第三方交易流水")
    private String chId;

    @_DDL_Column(name = "ch_type", type = SqlType.TINYINT_UNSIGNED, nullable = false, comment = "第三方类型")
    private Integer chType;

    @_DDL_Column(name = "ch_time", type = SqlType.TIMESTAMP, comment = "第三方交易时间")
    private java.sql.Timestamp chTime;

}
